/**
 * 
 */
package com.xinnet.mms.enums;


/**
 * 客户类型枚举
 * @author 颜绿水
 * @author $Author:$
 * @version $Revision:$ $Date:$ 
 * @since 2014-6-5
 * 
 */
public enum CustomerTypeEnmu {

	NEW_CUSTOMER(1,"新注册客户 "),
	INTENT_CUSTOMER(12,"保护期客户 "),
	TOCHARGE_CUSTOMER(3,"意向费客户 "),
	SERVICE_CUSTOMER(4,"服务期客户 "),
	PROTECTION_CUSTOMER(5,"待续客户 "),
	OPEN_SEA_CUSTOMER(6,"公海客户 "),
	SECEND_CUSTOMER(8,"二次开发客户 ");
	
	private Integer value;
	
	private String label;
	
	private CustomerTypeEnmu(Integer value, String label){
		this.value = value;
		this.label = label;
	}
	
	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
	
	/**
	 * 根据value获取对应的枚举
	 * @param value
	 * @return
	 */
	public static CustomerTypeEnmu getCustomerTypeEnmuByValue(Integer value){
		CustomerTypeEnmu[] custEnums = CustomerTypeEnmu.values();
		for (CustomerTypeEnmu customerTypeEnmu : custEnums) {
			if(customerTypeEnmu.getValue().equals(value)){
				return customerTypeEnmu;
			}
		}
		return null;
	}
	
}
